import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.简单题.寻找奇数
 */

class Main {
    public static void main(String[] args) {
        Scanner scanner  = new Scanner(System.in);
        int n = scanner.nextInt();
        int ret = 0;
        scanner.nextLine();
        for(int i = 0; i < n; i++) {
            int temp = scanner.nextInt();
            ret ^= temp;
        }
        System.out.println(ret);
    }

}

public class Test {
}
